package grafoS;

/**
 * Gcol is a program to help users to learn a little about graph coloring, in
 * this software, you can learn some coloring algorithms, and add your own
 * algorithm for coloring.You can also learn BFS and DFS search. This tool, also
 * support the .col format from DIMACS (Center for Discrete Mathematics and
 * Theoretical Computer Science), so you can import a big graph and use all the
 * algorithms. Copyright (C) <2015> Clóvis Daniel Souza Silva, Samuel Silva de
 * Souza, Professor Leonardo Sampaio Rocha.
 * 
* This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
* This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
* You should have received a copy of the GNU General Public License along with
 * this program. If not, see <http://www.gnu.org/licenses/>.
 * 
 * contact: projetoGrafos@gmail.com
 */
/**
 * This class will be used to model a vertex to be used by class GraphList each
 * vertex may contain attributes such as: name - represents his name. cor -
 * represents his color used in the searching algorithms. pi - represents his
 * father used in the searching algorithms. d - used in the searching
 * algorithms. f - used in the searching algorithms.
 *
 * @author Daniel
 * @author Samuel
 */
public class Vertice {

    private String cor;
    private int d;
    private int f;
    private Vertice pi;
    private int nome;

    /**
     * get color of vertice
     *
     * @return return his color to be used in the algorithms.
     */
    public String getCor() {
        return cor;
    }

    /**
     * get attribute d to be used in the in the searching algorithms.
     *
     * @return attribute to be used in the in the searching algorithms.
     */
    public int getD() {
        return d;
    }

    /**
     * get attribute f to be used in the in the searching algorithms.
     *
     * @return attribute to be used in the in the searching algorithms.
     */
    public int getF() {
        return f;
    }

    /**
     * get his father(searching algorithms).
     *
     * @return returns his father that is updated in searching algorithms.
     */
    public Vertice getPi() {
        return pi;
    }

    /**
     * get name of vertex
     *
     * @return return the name of vertex
     */
    public int getNome() {
        return nome;
    }

    /**
     * set the color for this vertex
     *
     * @param cor set new color to this vertex
     */
    public void setCor(String cor) {
        this.cor = cor;
    }

    /**
     * set attribute to be used in the in the searching algorithms.
     *
     * @param d value to be replaced
     */
    public void setD(int d) {
        this.d = d;
    }

    /**
     * set attribute to be used in the in the searching algorithms.
     *
     * @param f value to be replaced
     */
    public void setF(int f) {
        this.f = f;
    }

    /**
     * set the father for this vertex
     *
     * @param pi vertex to be replaced as father
     */
    public void setPi(Vertice pi) {
        this.pi = pi;
    }

    /**
     * set the name for this vertex
     *
     * @param nome name of vertex
     */
    public void setNome(int nome) {
        this.nome = nome;
    }
}
